import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:fluttermodule/color/MyUserTool.dart';

import 'Fav.dart';
import 'dart:ui' as ui; // 调用window拿到route判断跳转哪个界面
import 'Root.dart';
import 'MoreCtrl.dart';
import 'home.dart';
//void main() => runApp(MainCtrl());
void main() => runApp(_widgetForRoute(ui.window.defaultRouteName));
Widget _widgetForRoute(String route) {
  MyUserTool.getInstance();
  switch (route) {
    case 'fav':
      return Fav();
    case 'home':
      return Home();
    case 'detail':
      return More();
    default:
      return Root();
  }
}


